# make html-version of this manual with:
# rmarkdown::render("sentence3.R")
# load necessary libraries and ad-hoc functions
source("preamble.R")
Word order
namesOrder <- "X tu hinein etwas die kohle hinein in den ofen einlegen hinein dass wird kochen die Milch wird bald wird fängt an anfängt zu kochen fängt anfängt wird"
dataOrder <- getAlignSyntax("../data/WS3/WS3_1syntax.txt", 5, namesOrder)
# make into syntactically interesting features by using recoding profile
# write.recoding(dataOrder, file = "../data/WS3/tmp.yml", attr = list( c(3,7,12), 5, c(9,10), 11, c(15,25), c(16,17), c(24,21,23,26,27), c(21,22,23,26,27), c(14,15,18,20,21,23,25:28)))
order <- recode(dataOrder, "../data/WS3/syntaxRecoding.yml")
# plot ordering parameters
titlesOrder <- list(
tu.hinein = "Tu HINEIN"
, die.kohle = "Article before \'Kohle\'"
, den.ofen = "Article before \'Ofen\'"
, alternative.verb = "Extra verb like \'tu Kohle EINLEGEN"
, presence.etwas = "ETWAS Kohle"
, die.milch = "Article before \'Milch\'"
, position.kochen = "Position \'kochen\'"
, absence.zu = "anfängt ZU kochen"
, anfangen = "ANFÄNGT zu kochen"
, order.verbs = "Order Auxiliary verb and \'kochen\'"
)
sapply(seq_along(titlesOrder), function(x) {
plotSingle(order[,names(titlesOrder)[x]], titlesOrder[[x]])
}) -> silent
Lexicon
namesLexicon <- list(
tu = "tu leg mach schmeiß schütt stopp steck gooi wirf krieg holz gib"
, kohle = "Kohle Scheid Holz Grüß Feuer Glut Brand Torf"
, in1 = "in op bei"
, ofen = "Ofen Kachel Herd Stoof Küche Feuer Kachelofen"
, dass = "dass dann damit"
, wird = "tut wird soll kann beginnt geht"
, milch = "Milch Rahm"
, bald = "bald gleich geschwind gauw schnell rasch enta hortig vlug"
, zu = "zu mit"
, kochen = "kochen sieden wellen"
, anfangen = "anfangen anheben ankommen"
)
lexicon <- getAlignLexicon("../data/WS3/WS3_2lexicon.txt", namesLexicon)
titlesLexicon <- list(
tu = "TU Kohle in den Ofen"
, kohle = "tu KOHLE in den Ofen"
, in1 = "tu Kohle IN den Ofen"
, ofen = "to Kohle in den OFEN"
, dass = "DASS die Milch bald zu kochen anfangen wird"
, wird = "dass die Milch bald zu kochen anfangen WIRD"
, milch = "dass die MILCH bald zu kochen anfangen wird"
, bald = "dass die Milch BALD zu kochen anfangen wird"
, zu = "dass die Milch bald ZU kochen anfangen wird"
, kochen = "dass die Milch bald zu KOCHEN anfangen wird"
, anfangen = "dass die Milch bald zu kochen ANFANGEN wird"
)
sapply(seq_along(titlesLexicon), function(x) {
plotSingle(lexicon[,names(titlesLexicon)[x]], titlesLexicon[[x]])
}) -> silent
## Warning in brewer.pal(max(3, n), "Dark2"): n too large, allowed maximum for palette Dark2 is 8
## Returning the palette you asked for with that many colors
Characters
namesChars <- list(
tu = "t u n"
, Kohle = "k o r l e n"
, Ofen = "d o r f e n t"
, Milch = "m i r l e ch e"
, bald = "b a l d e n"
, kochen = "k o r ch e n e"
, anfangen = "a n e f a ng e t e"
)
dataChars <- getAlignChars("../data/WS3/WS3_3characters.txt", namesChars)
sapply(1:ncol(dataChars), function(x) {
plotSingle(dataChars[,x], colnames(dataChars)[x])
}) -> silent
## Warning in brewer.pal(max(3, n), "Dark2"): n too large, allowed maximum for palette Dark2 is 8
## Returning the palette you asked for with that many colors
## Warning in brewer.pal(max(3, n), "Dark2"): n too large, allowed maximum for palette Dark2 is 8
## Returning the palette you asked for with that many colors
## Warning in brewer.pal(max(3, n), "Dark2"): n too large, allowed maximum for palette Dark2 is 8
## Returning the palette you asked for with that many colors
## Warning in brewer.pal(max(3, n), "Dark2"): n too large, allowed maximum for palette Dark2 is 8
## Returning the palette you asked for with that many colors
## Warning in brewer.pal(max(3, n), "Dark2"): n too large, allowed maximum for palette Dark2 is 8
## Returning the palette you asked for with that many colors
## Warning in brewer.pal(max(3, n), "Dark2"): n too large, allowed maximum for palette Dark2 is 8
## Returning the palette you asked for with that many colors
## Warning in brewer.pal(max(3, n), "Dark2"): n too large, allowed maximum for palette Dark2 is 8
## Returning the palette you asked for with that many colors
## Warning in brewer.pal(max(3, n), "Dark2"): n too large, allowed maximum for palette Dark2 is 8
## Returning the palette you asked for with that many colors
## Warning in brewer.pal(max(3, n), "Dark2"): n too large, allowed maximum for palette Dark2 is 8
## Returning the palette you asked for with that many colors
## Warning in brewer.pal(max(3, n), "Dark2"): n too large, allowed maximum for palette Dark2 is 8
## Returning the palette you asked for with that many colors
## Warning in brewer.pal(max(3, n), "Dark2"): n too large, allowed maximum for palette Dark2 is 8
## Returning the palette you asked for with that many colors
## Warning in brewer.pal(max(3, n), "Dark2"): n too large, allowed maximum for palette Dark2 is 8
## Returning the palette you asked for with that many colors
## Warning in brewer.pal(max(3, n), "Dark2"): n too large, allowed maximum for palette Dark2 is 8
## Returning the palette you asked for with that many colors
## Warning in brewer.pal(max(3, n), "Dark2"): n too large, allowed maximum for palette Dark2 is 8
## Returning the palette you asked for with that many colors
## Warning in brewer.pal(max(3, n), "Dark2"): n too large, allowed maximum for palette Dark2 is 8
## Returning the palette you asked for with that many colors
## Warning in brewer.pal(max(3, n), "Dark2"): n too large, allowed maximum for palette Dark2 is 8
## Returning the palette you asked for with that many colors
## Warning in brewer.pal(max(3, n), "Dark2"): n too large, allowed maximum for palette Dark2 is 8
## Returning the palette you asked for with that many colors
## Warning in brewer.pal(max(3, n), "Dark2"): n too large, allowed maximum for palette Dark2 is 8
## Returning the palette you asked for with that many colors
## Warning in brewer.pal(max(3, n), "Dark2"): n too large, allowed maximum for palette Dark2 is 8
## Returning the palette you asked for with that many colors
show Session Info
sessionInfo()
## R version 3.4.2 (2017-09-28)
## Platform: x86_64-apple-darwin15.6.0 (64-bit)
## Running under: macOS High Sierra 10.13.1
##
## Matrix products: default
## BLAS: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRblas.0.dylib
## LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib
##
## locale:
## [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
##
## attached base packages:
## [1] stats graphics grDevices utils datasets methods base
##
## other attached packages:
## [1] spdep_0.6-15 sp_1.2-5 RColorBrewer_1.1-2
## [4] qlcData_0.1.0 qlcMatrix_0.9.5 sparsesvd_0.1-1
## [7] slam_0.1-40 Matrix_1.2-12 qlcVisualize_0.1.0
##
## loaded via a namespace (and not attached):
## [1] nlme_3.1-131 bitops_1.0-6 gmodels_2.16.2
## [4] rprojroot_1.2 prabclus_2.2-6 docopt_0.4.5
## [7] tools_3.4.2 backports_1.1.1 R6_2.2.2
## [10] rpart_4.1-11 KernSmooth_2.23-15 alphahull_2.1
## [13] lazyeval_0.2.1 mgcv_1.8-22 colorspace_1.3-2
## [16] trimcluster_0.1-2 nnet_7.3-12 raster_2.6-7
## [19] gridExtra_2.3 splancs_2.01-40 compiler_3.4.2
## [22] sgeostat_1.0-27 expm_0.999-2 TSP_1.1-5
## [25] diptest_0.75-7 caTools_1.17.1 scales_0.5.0
## [28] DEoptimR_1.0-8 spatstat.data_1.1-1 mvtnorm_1.0-6
## [31] robustbase_0.92-8 spatstat_1.53-2 goftest_1.1-1
## [34] stringr_1.2.0 digest_0.6.12 foreign_0.8-69
## [37] spatstat.utils_1.7-1 rmarkdown_1.7 R.utils_2.6.0
## [40] htmltools_0.3.6 maps_3.2.0 rlang_0.1.4
## [43] shiny_1.0.5 mapplots_1.5 mclust_5.3
## [46] gtools_3.5.0 dendextend_1.6.0 R.oo_1.21.0
## [49] magrittr_1.5 modeltools_0.2-21 dotCall64_0.9-04
## [52] Rcpp_0.12.13 munsell_0.4.3 abind_1.4-5
## [55] viridis_0.4.0 R.methodsS3_1.7.1 stringi_1.1.5
## [58] whisker_0.3-2 yaml_2.1.14 MASS_7.3-47
## [61] flexmix_2.3-14 gplots_3.0.1 plyr_1.8.4
## [64] grid_3.4.2 maptools_0.9-2 gdata_2.18.0
## [67] deldir_0.1-14 lattice_0.20-35 splines_3.4.2
## [70] tensor_1.5 knitr_1.17 boot_1.3-20
## [73] fpc_2.1-10 tripack_1.3-8 codetools_0.2-15
## [76] stats4_3.4.2 LearnBayes_2.15 gclus_1.3.1
## [79] evaluate_0.10.1 mapdata_2.2-6 httpuv_1.3.5
## [82] spam_2.1-1 foreach_1.4.3 gtable_0.2.0
## [85] polyclip_1.6-1 kernlab_0.9-25 ggplot2_2.2.1
## [88] mime_0.5 xtable_1.8-2 RSpectra_0.12-0
## [91] coda_0.19-1 class_7.3-14 viridisLite_0.2.0
## [94] seriation_1.2-2 tibble_1.3.4 iterators_1.0.8
## [97] registry_0.3 fields_9.0 cluster_2.0.6